package com.cya.lotterysystem.service;

import com.cya.lotterysystem.controller.param.DrawPrizeParam;
import com.cya.lotterysystem.controller.param.ShowWinningRecordsParam;
import com.cya.lotterysystem.dao.dataobject.WinnerRecordDO;
import com.cya.lotterysystem.service.dto.WinnerResultDTO;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.util.List;

/**
 * @author ：陈奕安（3048279304@qq.com）
 * @date ：Created in 2025/11/6 22:27
 * @description：
 * @modified By：
 * @version:
 */
public interface DrawPrizeService {
    /**
     * 异步抽奖接口
     * @param param
     */
    void drawPrize(DrawPrizeParam param);

    Boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖者名单
     * @param param
     */
    List<WinnerRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 删除奖品下的中奖记录
     * @param activityId
     * @param prizeId
     */
    void deleteRecord(Long activityId,Long prizeId);

    /**
     * 获取中奖记录
     * @param param
     * @return
     */
    List<WinnerResultDTO> getRecords(ShowWinningRecordsParam param) throws JsonProcessingException;
}